# 循环综合案例练习
import random
total_wages = 10000 #账户工资
employee_number = range(1,21)   #员工编号

for x in employee_number:
    if total_wages < 1000:
        print("工资发完了，下月在领取吧。")
        break
    performance = random.randint(1,10)  #随机产生1-10绩效
    if performance < 5 :
        print(f"员工{x},绩效为{performance},低于5，不发工资，下一位。")
        continue
    total_wages-=1000
    print(f"向员工{x}发放工资1000元,账户余额还剩{total_wages}元")


